This invention relates to an image processing device for displaying images whereby central figures or peripheral figures set in a virtual spatial coordinates system are viewed from a certain viewpoint, a game machine using this processing device, an image processing method and a medium.
With the progress in computer graphics technology in recent years, data processing devices such as video game machines and simulation machines have become commonly used. A video game machine, for example, is provided with peripherals, such as game pads, joysticks, a monitor, or the like, and a game main unit containing a CPU which implements image processing, sound processing, data communications with the peripherals, and the like. Image processing in video game machines is extremely important in terms of raising the value of the product, and therefore technology for reproduction of animated images has also become highly advanced in recent years. For example, games involving stereoscopic three-dimensional (3D) image representations, rather than two-dimensional images, have come to be widely played, and highly advanced image processing is conducted in games of this kind.
In cases where graphics for game screens are created by means of 3D calculation in order to display three-dimensional images, the representation of images of the game field or player""s characters located therein depends greatly on which viewpoint the three-dimensionally created objects are to be observed from. For example, if the viewpoint is set directly to the side of a character, then in the terms of the 3D game, this will produce a xe2x80x9cside viewxe2x80x9d, and if the viewpoint is set to directly above a character, then this will correspond to a xe2x80x9ctop viewxe2x80x9d.
Since the display device used in a video game is a two-dimensional cathode ray tube, it is inevitably difficult to perceive distances in the front-back direction with respect to the screen. Therefore, it a common technique to set a viewpoint such that, of the three-dimensional coordinate axes, X, Y and Z, a coordinate axis wherein detailed perception of distance is not required in relation to the contents of the game is set in the front-back direction, namely, perpendicular to the front plane.
For example, in a 3D shooting game, as shown in FIG. 14, enemies and missiles approach from in front and the player""s craft has to avoid these enemies and missiles by moving up and down, and left and right. In this case, the player moves in the up and down direction and left and right direction and these directions are therefore very important. On the other hand, the front-back distance is of little relative importance. Therefore, in a 3D shooting game of this kind, the two-dimensional screen is set in the up-down and left-right planes, whilst the front-back plane is set perpendicular to this.
In this way, in a 3D shooting game it is not especially an impediment if the line of sight is fixed in a forward direction, but there exist other types of game. For instance, in a game where the player controls a character to fight with opponents, or in a game where the character has to break through various obstacles, there are cases where the coordinate axis in which a detailed perception of distance is required may change depending on the shape of the landscape in which the character operated by the player is moving, or the player""s own preferences or skill level. In other words, it is not possible to create an appropriate playing environment using only a single type of viewpoint.
Technology corresponding to this is represented by a xe2x80x9cvirtual buttonxe2x80x9d. This is a device whereby a desired viewpoint is continually selected from a plurality of prepared types of viewpoint, in accordance with the player""s individual preferences.
However, using a xe2x80x9cvirtual buttonxe2x80x9d has a disadvantage in that it adds an xe2x80x9coperation for changing the viewpointxe2x80x9d to the original game operation, and therefore makes the game operation more complex. Furthermore, since the player has to look for the optimum viewpoint him or herself, it obstructs his or her concentration on playing the game.
This invention was devised in order to overcome problems of this kind, an object thereof being to provide an image processing device whereby an optimum viewpoint is automatically provided, thus creating a favourable game environment, without burdening the player, and a game machine using this image processing device, an image processing method and a medium whereon programs for same are recorded.
In an image processing device, which generates images wherein a central figure and peripheral figures set in a virtual spatial coordinates system are viewed from a prescribed viewpoint, and outputs image display signals corresponding to these images, the image processing device relating to this invention comprises focal point calculating means for determining a second point on the peripheral figures on the basis of a first point previously set with respect to the central figure, line of sight calculating means for determining a line of sight on the basis of the first point and the second point, viewpoint calculating means for determining the viewpoint on the basis of the first point and the line of sight, and image signal generating means for generating the image display signals corresponding to the image viewed from the viewpoint in the direction of the line of sight.
A virtual spatial coordinate system is used, for example, in the type of game where a game field is created by 3D calculation, and the player controls a character within that game field. xe2x80x9cCentral figurexe2x80x9d refers to the character being operated by the player, for example. xe2x80x9cPeripheral figuresxe2x80x9d refers the landscape, buildings, obstacles etc. surrounding the character, and in a fighting game, or the like, it also includes opponent characters.
The first point may be set, for example, inside the character""s head, or the like. In this case, the line of sight will appear natural to the player. However, the first point does not have to be set inside the character, but may also be set outside the character, for instance, above the character""s head.
The second point may be set, for example, on the surface, inside or outside the landscape at a prescribed distance from the first point.
The line of sight is, for example, a straight line linking the first point with the second point.
The viewpoint is set, for example, in a position on the line of sight on the opposite side to the second point, at a prescribed distance from the second point.
Furthermore, in the image processing device relating to this invention, the focal point calculating means determines a point on the peripheral figure which is at a predetermined first distance from the first point, and sets this point as the second point.
The first distance may have a fixed value, or it may be selected or changed according to circumstances. Furthermore, the first distance is a distance in the horizontal plane, for example.
Moreover, the image processing device relating to this invention determines the first distance in accordance with the movement of the central figure.
For example, if the character is moving quickly, then the first distance is set to a large distance such that a broad field of view is obtained by looking into the far distance, whereas if the character is moving slowly, the first distance is set to a small distance such that near objects can be viewed in detail.
Furthermore, in the image processing device relating to this invention, if a moving figure is included in the peripheral figures, then the focal point calculating means sets a point corresponding to the moving figure as the second point.
A moving figure may be, for example, an opponent character in a fighting game. The second point may be set, for example, inside the opponent character""s head, or the like. However, the second point does not have to be set inside the opponent character, but may also be set outside the character, for instance, above the character""s head.
Furthermore, in the image processing device relating to this invention, the viewpoint calculating means determines a point on the line of sight which is at a predetermined second distance from the first point and sets this point as the viewpoint.
The second distance may have a fixed value, or it may be selected or changed according to circumstances. The second distance may be a distance in three-dimensional space or it may be a distance in a horizontal plane.
In the image processing device relating to this invention, the second distance is taken as a distance in a horizontal plane, coordinates which are at the second distance from the first point projected in this horizontal plane are determined, these coordinates are set as the horizontal plane coordinates of the viewpoint, and the viewpoint is determined on the basis of these horizontal plane coordinates, and moreover, a maximum value for the distance between the first point and the viewpoint is determined, and if this maximum value is exceeded, the viewpoint is determined such that the distance between the first point and the viewpoint does not exceed the maximum value, regardless of the second distance.
If the second distance is taken as a distance in the horizontal plane, then the viewpoint may be set in an unnaturally distant position from the first point, depending on the angle of the line of sight, and therefore a maximum value is provided such that it is not distanced by more than a certain value.
In the image processing device relating to this invention, the second distance is determined in accordance with the size of the central figure.
For example, if the character is large, or if there are a plurality of characters, the second distance is set to a large distance, so that all of the characters can be seen, whereas if the characters are small, or there is only one character, then the second distance is set to a short distance.
The game machine relating to this invention is provided with any one of the image processing devices described above, and the central figure is taken as the figure of a game character, and the peripheral figure is taken as the figure of a landscape.
In an image processing method whereby images wherein a central figure and peripheral figures set in a virtual spatial coordinates system are viewed from a prescribed viewpoint are generated, and image display signals corresponding to these images are generated, the image processing method relating to this invention is such that a second point on the peripheral figure is determined on the basis of a first point previously set with respect to the central figure, a line of sight is determined on the basis of the first point and the second point, the viewpoint is determined on the basis of the first point and the line of sight, and the image display signals are generated corresponding to the image viewed from the viewpoint in the direction of the line of sight.
Furthermore, the image processing method relating to the present invention is such that, if the central figure is taken as the figure of a game character, and the peripheral figure is taken as the figure of a landscape, an image is generated in an upward-looking line of sight when the landscape in the direction that the character is facing is high, and an image is generated in a downward-looking line of sight when the landscape in the direction that the character is facing is low.
Moreover, the image processing method relating to the present invention is such that, if the central figure is taken as the figure of a game character, and the peripheral figure is taken as the figure of a landscape and an opponent character, then an image is generated in a line of sight from the character towards the opponent character.